import React from 'react';
import { Link } from 'react-router-dom';
class IcoBox extends React.Component{
    constructor(props){
        super(props);
    }
    gopage(){
        this.props.goPage(this.props.url)
    }
    render(){
        return(
            <div className="order-btn quarter " name={this.props.left?'left':''} onClick={e=>{this.gopage(e)}} >
                    {this.props.ico?<i  className={` iconfont  ico ${this.props.ico}`} ></i>:<img alt="" className="pic" src={this.props.img}/>}
                    <div className="l hui">{this.props.name}</div>
                    {this.props.children}
                </div>
        )
    }
}
export default IcoBox;